﻿using System;
using Transformable_Engine_v2.Engine.Graphics;
using Transformable_Engine_v2.Engine.Transformable_Math.Geometry;

namespace Super_Management_Mayhem.Content.Spritesheet
{
    public class BorderSheet : SpriteSheetInstance
    {
        private static SpriteSheetInstance _instance;
        public static void LoadContent()
        {
            _instance = new BorderSheet();
        }
        public new static Sprite GetSprite(Enum textureName)
        {
            return _instance.GetSprite(textureName);
        }
        public static SpriteSheetInstance GetInstance()
        {
            return _instance;
        }


        public enum InnerBorder
        {
            VerticalTop,
            VerticalCenter,
            VerticalBottom,
            HorizontalLeft,
            HorizontalCenter,
            HorizontalRight,
            Cross
        }

        public enum OuterBorder
        {
            TopLeftCorner,
            Top,
            TopRightCorner,
            Left,
            Center,
            Right,
            BottomLeftCorner,
            Bottom,
            BottomRightCorner,
        }

        public override string SpriteSheetPath
        {
            get
            {
                return "Content/Images/Border.png";
            }
        }

        protected override void LoadSprites()
        {
            AddEnumList<OuterBorder>(OuterBorder.TopLeftCorner, OuterBorder.BottomRightCorner, new TE_Rectangle(0, 0, 2, 2), 3);

            AddSprite(InnerBorder.HorizontalLeft, new TE_Rectangle(0, 6, 0.5f, 1));
            AddSprite(InnerBorder.HorizontalCenter, new TE_Rectangle(0.5f, 6, 0.5f, 1));
            AddSprite(InnerBorder.HorizontalRight, new TE_Rectangle(1, 6, 0.5f, 1));
            AddSprite(InnerBorder.VerticalTop, new TE_Rectangle(1.5f, 6, 1, 0.5f));
            AddSprite(InnerBorder.VerticalCenter, new TE_Rectangle(1.5f, 6, 1, 0.5f));
            AddSprite(InnerBorder.VerticalBottom, new TE_Rectangle(1.5f, 7, 1, 0.5f));
            AddSprite(InnerBorder.Cross, new TE_Rectangle(2.5f, 6, 1, 1));
        }
    }
}